home *** CD-ROM | disk | FTP | other *** search
/ Network PC / Network PC.iso / amiga utilities / disk utilities / dirutil / dopus / opus5utils / arexx / wincopy.dopus5 < prev    next >
Encoding:
Text File  |  1997-11-21  |  2.3 KB  |  74 lines

  1. /* WinCopy for Directory Opus 5.
  2.    By Leo Davidson ("Nudel", Pot-Noodle/Gods'Gift Utilities)
  3.  
  4. $VER: WinCopy.dopus5 1.3 (18.8.95)
  5.  
  6.    NOTE: This script _requires_ DOpus v5.11 or above.
  7.  
  8.    NOTE: This script does *NOT* do the same thing as Gary Gagnon's
  9.          "CloneSRCE.dopus5" or "same.dopus5", read on...
  10.  
  11.    This script will copy the source lister to the destination lister,
  12.    like the old copywin command in DOpus4.
  13.  
  14.    If you wish to open a _new_ lister which is a copy of the source
  15.    one (as apposed to turning an existing lister into a copy of the
  16.    source), you should use Gary Gagnon's "CloneSRCR.dopus5" script,
  17.    which was included in the official DOpus v5.11 update as
  18.    "DOpus5:ARexx/same.dopus5". Gary's script is also able to clone
  19.    multiple source listers at once.
  20.  
  21. Call as:
  22. ------------------------------------------------------------------------------
  23. ARexx    DOpus5:ARexx/WinCopy.dopus5 {Qp}
  24. ------------------------------------------------------------------------------
  25. Turn off all switches.
  26.  
  27.    v1.01 -> v1.02 - Made "PathOnly" the default behaviour and removed the
  28.                     option to copy the window dimensions (Did anyone want it?).
  29.                     Some minor tidying up.
  30.                     Now checks to make sure the DOPUS.x port exists.
  31.     v1.02 -> v1.3 - Now uses Show() instead of ShowList(). (Thanks Stoebi)
  32.                     Style Guide compliant version numbering and $VER string.
  33. */
  34.  
  35. options results
  36. options failat 99
  37. signal on syntax;signal on ioerr        /* Error trapping */
  38. parse arg DOpusPort
  39. DOpusPort = Strip(DOpusPort,"B",'" ')
  40.  
  41. If DOpusPort="" THEN Do
  42.     Say "Not correctly called from Directory Opus 5!"
  43.     Say "Load this ARexx script into an editor for more info."
  44.     EXIT
  45.     END
  46. If ~Show("P",DOpusPort) Then Do
  47.     Say DOpusPort "is not a valid port."
  48.     EXIT
  49.     End
  50. Address value DOpusPort
  51.  
  52. lister query source stem source_handle.
  53.  
  54. IF source_handle.count = 0 | source_handle.count = "SOURCE_HANDLE.COUNT" Then Do
  55.     dopus request '"You must have a SOURCE lister!" OK'
  56.     EXIT
  57.     End
  58.  
  59.  
  60. lister query dest stem dest_handle.
  61.  
  62. IF dest_handle.count = 0 | dest_handle.count = "DEST_HANDLE.COUNT" Then Do
  63.     dopus request '"You must have a DESTINATION lister!" OK'
  64.     EXIT
  65.     End
  66.  
  67.  
  68. lister query source_handle.0 path
  69. source_path = RESULT
  70. lister read dest_handle.0 source_path
  71.  
  72. syntax:;ioerr:                /* In case of error, jump here */
  73. EXIT
  74.